from multiprocessing import Process
import multiprocessing
import os


def run_pyfile(filepath):
    os.system(r"python " + filepath + ".py")


if __name__ == "__main__":
    filename = [
        "updateing_cache",
        "updateing_stock_data",
        # "live_update"
    ]
    for file in filename:
        filepath = file
        print(filepath)
        p = Process(target=run_pyfile, args=(filepath,))
        p.start()
    p.join()
    exit()
    # import live_update
